package com.cnc.ssm.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import java.io.Serializable;

/**
 * @author Hibernate CodeGenerator
 */
public class PwSqVal implements Serializable {

    /**
     * identifier field
     */
    private String sqKey;

    /**
     * nullable persistent field
     */
    private Long currVal;

    /**
     * full constructor
     */
    public PwSqVal(java.lang.String sqKey, java.lang.Long currVal) {
        this.sqKey = sqKey;
        this.currVal = currVal;
    }

    /**
     * default constructor
     */
    public PwSqVal() {
    }

    /**
     * minimal constructor
     */
    public PwSqVal(java.lang.String sqKey) {
        this.sqKey = sqKey;
    }

    public java.lang.String getSqKey() {
        return this.sqKey;
    }

    public void setSqKey(java.lang.String sqKey) {
        this.sqKey = sqKey;
    }

    public java.lang.Long getCurrVal() {
        return this.currVal;
    }

    public void setCurrVal(java.lang.Long currVal) {
        this.currVal = currVal;
    }

    public String toString() {
        return new ToStringBuilder(this)
                .append("sqKey", getSqKey())
                .toString();
    }

    public boolean equals(Object other) {
        if (!(other instanceof PwSqVal)) return false;
        PwSqVal castOther = (PwSqVal) other;
        return new EqualsBuilder()
                .append(this.getSqKey(), castOther.getSqKey())
                .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
                .append(getSqKey())
                .toHashCode();
    }

}
